<?php

//require_once  __DIR__ . '/includes/authenticate.php';

if ( isset($_POST['ID']) && isset($_POST['decision']) ) {

	$ID = $_POST['ID'];
	$decision = $_POST['decision'];


	$sql = "UPDATE attentionpointsteams 
	SET visibility = '$decision' 
	WHERE ID = $ID";

	include_once './db_bb_connect.php';

	if ($db->query($sql)) {
		echo "Visibility succesfully changed to $decision.</center>";
	} else {
		echo "Something Wrong";
		echo "Error: " . $sql . "<br>" . $db->error;
	}

} else {
	echo "Something Wrong";
}

?>